<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="__PUBLIC__/Css/manager.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="__PUBLIC__/Js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $('table tr').hover(function(){
                $(this).addClass('hover');
            },function(){
                $(this).removeClass('hover');
            });
        })
    </script>
</head>
<body>
<div>
    <h2>操作列表 </h2>
    <div>
        <table cellspacing="0" border="0">
            <tr class="title">
                <th>ID</th>
                <th>操作名</th>
                <th>操作别名</th>
                <th>状态</th>
                <th>父操作</th>
                <th>操作等级</th>
                <th>排序号</th>
                <th>备注</th>
                <th>操作</th>
            </tr>
            <volist name="list" id="vo">
                <tr>
                    <td>{$vo['id']}</td>
                    <td>{$vo["name"]}</td>
                    <td>{$vo["title"]}</td>
                    <td>{$vo["status"]}</td>
                    <td>{$vo["pid"]}</td>
                    <td>{$vo["level"]}</td>
                    <td>{$vo["sort"]}</td>
                    <td>{$vo["remark"]}</td>
                    <td>
                        <a href="__URL__/modify/id/{$vo['id']}">修改</a>
                        <br>
                        <a href='javascript:deleteNode("{$vo['id']}")'>删除</a>
                    </td>
                </tr>
            </volist>
        </table>
        <div align="right">{$page}</div>
        <input type="button" value="新增操作" id="addBtn">
        <script type="text/javascript">
            function deleteNode(id){
                $.get(
                        "__URL__/delete",
                        {"id":id},
                        function(data){
                            alert(decodeURI(data.info));
                            if(data.status!=2){
                                window.location.href=data['data'];
                            }
                        },
                        "json"
                );
            }

            $(document).ready(function(){
                $("#addBtn").click(function(){
                    window.location.href="__URL__/add";
                });
            });
        </script>
    </div>
</div>
</body>
</html>